home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_actor_seagull.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  58 lines

  1. # Jones 3D Cog Script
  2. #
  3. # actor_Seagull.cog
  4. #
  5. # [RT] [MDR]
  6. #
  7. # Data setup and special flap anim for seagulls.
  8. #
  9. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  10. #
  11. # ========================================================================================
  12.  
  13. symbols
  14.  
  15.     message        created
  16.     message        sighted
  17.     message        timer
  18.  
  19. end
  20.  
  21. # ========================================================================================
  22. code
  23.  
  24. # .................................................................................    
  25. created:
  26.  
  27.     AISetSubMode(GetSenderRef(), 0x20000);            # Set SUBMODE_CONTINUOUSMOTION
  28.  
  29.     return;
  30.  
  31.  
  32. # .................................................................................    
  33. sighted:
  34.  
  35.     SetThingTimer(GetSenderRef(), 5);
  36.     return;
  37.  
  38. # .................................................................................    
  39. timer:
  40.  
  41.     if ( IsModePlaying(GetSenderRef(), 61) > 0 )    # Seagull uses SITH_PUPPETADDIN_ACTIVATEHIGH for flapping
  42.     {
  43.         StopMode(GetSenderRef(), 61, 0.0);
  44.     }
  45.     else
  46.     {
  47.         if (Rand() < 0.5)
  48.         {
  49.             PlayMode(GetSenderRef(), 61, 0);
  50.         }
  51.     }
  52.     
  53.     SetThingTimer(GetSenderRef(), RandBetween(3, 6));
  54.     return;
  55.  
  56. end
  57.  
  58.